package file.day9_25.day09;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class 泛型 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();

        c.add("a");
        c.add("b");
        c.add("c");
//        c.add(s);//泛型规定添加内容的类型

        Iterator<String> it = c.iterator();
        for (String str : c){
            System.out.println(str);
        }

    }
}
